<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript" src="js/selectedList_teacher.js"></script>

<c:choose>
	<c:when test="${sessionScope.mvo!=null}">
		<input type="hidden" name="id" value="${sessionScope.mvo.id}">
		<input type="hidden" name="membertype" value="${sessionScope.mvo.membertype}">
		<div id="selectedList_teacher_container">
			<h3>${sessionScope.mvo.name }님의 찜리스트</h3>
			<div id ="selectedList_teacher_input">
				<input type="radio" name="listtype" value="s" checked="checked">나를 찜한 학생
				<input type="radio" name="listtype" value="t">내가 찜한 수업의 학생
			</div>
			<div id="selectedList_teacher_table_container">
				<table id="selectedList_teacher_table_type_s">
					<thead >
					<tr>
						<td>이름</td><td>성별</td>
						<td>소속</td><td>희망과목</td>
					</tr>
					</thead>
					<tbody>
					<c:forEach items="${requestScope.map.s}" var="stList">
					<tr>
						<td>${stList.studentVO.name }</td>
						<td>${stList.studentVO.gender }</td>
						<td>${stList.studentVO.grade }</td>
						<td>${stList.studentVO.hopesubject }</td>
					</tr>
					</c:forEach> 
					</tbody>
				</table>
				<table id="selectedList_teacher_table_type_t">
					<thead>
					<tr>
						<td>이름</td><td>성별</td>
						<td>소속</td><td>희망과목</td>
					</tr>
					</thead>
					<tbody>
					</tbody>
				</table>
			</div>
		</div>
	</c:when>
	<c:otherwise>
		<script type="text/javascript">
		var path ="selectedList/selectedList.mypage";
		location.href="loginResult.do?path="+path;
		</script>
	</c:otherwise>
</c:choose>
